<div class="content-section introduction">
  <div>
    <span class="feature-title">库存管理<span class="gt">&gt;</span>物料维护  </span>
  </div>
</div>
<div class="content-section implementation GridDemo clearfixes material">
  <div class="mysearch">
    <div class="ui-g">
      <button pButton type="button"  label="新增"  (click)="showMaterialMask()" ></button>
      <button pButton type="button"  label="编辑"  (click)="updateOption()" [disabled]="selectMaterial.length===0||selectMaterial.length>1"></button>
      <button pButton type="button"  label="删除"  (click)="deleteMaterial()" [disabled]="selectMaterial.length === 0"></button>
      <button pButton type="button"  label="启用"  (click)="enabled()" [disabled]="selectMaterial.length===0|| selectMaterial.length>1 "  ></button>
      <button pButton type="button"  label="冻结"  (click)="freeze()" [disabled]="selectMaterial.length===0 ||selectMaterial.length>1 " ></button>

    </div>
  </div>

    <div class="mybutton ui-g-12 ui-md-8 ui-lg-8">

    </div>


  <div style="clear: both"></div>
  <p-dataTable [value]="MaterialData"
               [totalRecords]="totalRecords"  [(selection)]="selectMaterial">
    <p-column [style]="{'width':'38px'}" selectionMode="multiple"></p-column>
    <p-column  *ngFor="let col of cols" field="{{col.field}}" header="{{col.header}}"  [sortable]="true"></p-column>
    <ng-template pTemplate="emptymessage">
      当前没有数据
    </ng-template>
    <!--{{selectMaterial}}-->
  </p-dataTable>
  <p-paginator rows="10" [totalRecords]="totalRecords" [rowsPerPageOptions]="[10,20,30]" (onPageChange)="paginate($event)"></p-paginator>

</div>
<app-add-or-update-material
  *ngIf="showMaterial"
  (closeMaterial)="closeMaterialMask($event)"
  [currentMeterial]="currentMaterial"
  (addMaterial)="addMaterial($event)"
  [state]="state"
  (updateDev)="updateMaterial($event)"
></app-add-or-update-material>




